Screenshot Upload to Discord
This project is a small, standalone website that lets anyone submit a screenshot — with an optional username/player ID and description — without needing a Discord account or signing in. Submissions are forwarded straight into a Discord channel through a Discord webhook.
It's built as a separate Cloudflare Worker with static assets (independent from this documentation site), with a small Worker script handling the backend. There is no server to run or maintain.
How It Works
- A visitor opens the upload page and drags in (or selects) one or more screenshots.
- They optionally add a username/player ID and a short description.
- A Turnstile widget confirms the visitor isn't a bot.
- The form submits to the Worker's
/api/submitroute. - The Worker validates the request (file type, size, count, Turnstile token, and basic rate limiting), then re-posts the files and details to your Discord webhook.
- The screenshot and any details appear in your Discord channel, and the visitor sees a confirmation message.
What the Finished Page Includes
- 📸 Screenshot upload with drag-and-drop support (up to 5 files, 10 MB each).
- 👤 Optional username or player ID field.
- 📝 Optional description field.
- 🛡️ Cloudflare Turnstile bot protection, server-side file validation, and basic per-IP rate limiting.
- ✅ A clear submission confirmation (or error) message.
Source Code
The full source for the upload page and its backend function lives in this repository at:
Guide
- Discord Webhook Setup — Create the webhook that receives submissions.
- Deploying to Cloudflare Workers — Configure Turnstile, deploy the project, and set the required secrets.
💬 Recent Comments